package com.community.charge.controller;

import com.community.charge.service.HouseVoService;
import com.community.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/houseVo")
public class HouseVoController extends BillController{

    @Autowired
    private HouseVoService houseVoService;

    //根据楼宇绑定房屋下拉框
    @GetMapping("/getHouseVoNameAndId/{id}")
    public AjaxResult getHouseVoNameAndId(@PathVariable Integer id){
        return AjaxResult.success(houseVoService.getHouseVoNameAndId(id));
    }

    //绑定搜索框的房屋下拉框
    @GetMapping("/getHouseVoIdAndName")
    public AjaxResult getHouseVoIdAndName(){
        return AjaxResult.success(houseVoService.getHouseVoIdAndName());
    }

}
